﻿
namespace Numbrella.Tracker.WebService.Implementation
{
    using System.Collections.Generic;
    using System.Linq;    

    public class ProblemsService : IProblemsService
    {                
        public IList<Problem> GetProblems()
        {
            using (Data.TrackerEntities entities = new Data.TrackerEntities())
            {
                // There is no problems in database, so we currently use Users instead :)
                IList<Problem> problems = (from u in entities.Users
                                          select new Problem { Name = u.Name }).ToList();

                return problems;
            }            
        }
    }
}
